package cn.rengy.web.framework.shiro.token;

import org.apache.shiro.authc.AuthenticationToken;
/**
 * uniapp微信登录
 * @author rengy
 *
 */
public class UniAppToken implements AuthenticationToken{
	private static final long serialVersionUID = 7457613418720655133L;
	private String unionid;
	private String access_token;
	private int expires_in;
	private String refresh_token;
	private String openid;
	private String scope;
	private String clientId;
	
	public UniAppToken(String unionid, String access_token, int expires_in, String refresh_token, String openid,
			String scope,String clientId) {
		super();
		this.unionid = unionid;
		this.access_token = access_token;
		this.expires_in = expires_in;
		this.refresh_token = refresh_token;
		this.openid = openid;
		this.scope = scope;
		this.clientId = clientId;
	}
	@Override
	public Object getPrincipal() {
		return unionid;
	}
	@Override
	public Object getCredentials() {
		return unionid;
	}
	public String getUnionid() {
		return unionid;
	}
	public void setUnionid(String unionid) {
		this.unionid = unionid;
	}
	public String getAccess_token() {
		return access_token;
	}
	public void setAccess_token(String access_token) {
		this.access_token = access_token;
	}
	public int getExpires_in() {
		return expires_in;
	}
	public void setExpires_in(int expires_in) {
		this.expires_in = expires_in;
	}
	public String getRefresh_token() {
		return refresh_token;
	}
	public void setRefresh_token(String refresh_token) {
		this.refresh_token = refresh_token;
	}
	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	public String getScope() {
		return scope;
	}
	public void setScope(String scope) {
		this.scope = scope;
	}
	public String getClientId() {
		return clientId;
	}
	public void setClientId(String clientId) {
		this.clientId = clientId;
	}
	
	
}
